package com.example.taobaounion.utils;

import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

public class KeyboardUtil {
    public static void hide(Context pContext, View pView) {
        InputMethodManager lInputMethodManager = (InputMethodManager) pContext.getSystemService(Context.INPUT_METHOD_SERVICE);

        assert lInputMethodManager != null;
        lInputMethodManager.hideSoftInputFromWindow(pView.getWindowToken(), 0);
    }


    public static void show(Context pContext, View pView) {
        InputMethodManager lInputMethodManager = (InputMethodManager) pContext.getSystemService(Context.INPUT_METHOD_SERVICE);

        assert lInputMethodManager != null;
        lInputMethodManager.showSoftInput(pView, 0);
    }
}
